<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  xml:lang="utf-8">
  <head>
    <title><%= @page_title || "多背一公斤 - 灾后学校重建计划" %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
    <link href="/stylesheets/base.css" type="text/css" rel="stylesheet"></link>
    <%= javascript_include_tag :defaults %>
    <%= yield :head %>
  </head>
  <body>
    <div id="wrapper">
      <div id="header">
        <a href="/"><img src="/images/logo.gif" alt="多背一公斤" width="124" height="56" class="logo" /></a>
        <div id="nav">
          <%= render :partial => "/shared/nav" %>
        </div>
        <div id="up">
          <% unless logged_in? -%>
            <a href="/login">登录</a> | <a href="/signup">注册</a>
          <% else -%>
            <%= current_user.login %> | <%= link_to inbox_title(@unreads), messages_url %> | <%= link_to "我的主页", user_path(current_user.id) %> | <a href="/setting">设置</a> | <a href="/logout">注销</a>
          <% end -%>
        </div>
        
      </div>
      <div id="content">
        <div id="sidebar">
          <%= yield :sidebar %>
        </div>
        <div id="main">
          <% if flash[:notice] -%>
      			<div class="flashNotice"><%= flash[:notice] %></div>
      		<% end -%>
          <%= yield :layout %>
        </div>
        
      </div>
      <div id="footer">
        <a href="http://www.1kg.org" target="_blank">多背一公斤</a> &copy; 2008
      </div>
    </div>
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-1030835-3");
    pageTracker._initData();
    pageTracker._trackPageview();
    </script>
  </body>
</html>